Question: Let
\[\mathbf{M} = \begin{pmatrix} 1 & 2 & 2 \\ 2 & 1 & -2 \\ a & 2 & b \end{pmatrix}.\]If $\mathbf{M} \mathbf{M}^T = 9 \mathbf{I},$ then enter the ordered pair $(a,b).$

Note: For a matrix $\mathbf{A},$ $\mathbf{A}^T$ is the transpose of $\mathbf{A},$ which is generated by reflecting the matrix $\mathbf{A}$ over the main diagonal, going from the upper-left to the lower-right.  So here,
\[\mathbf{M}^T = \begin{pmatrix} 1 & 2 & a \\ 2 & 1 & 2 \\ 2 & -2 & b \end{pmatrix}.\]
Solution: We have that
\[\mathbf{M} \mathbf{M}^T = \mathbf{M} = \begin{pmatrix} 1 & 2 & 2 \\ 2 & 1 & -2 \\ a & 2 & b \end{pmatrix} \begin{pmatrix} 1 & 2 & a \\ 2 & 1 & 2 \\ 2 & -2 & b \end{pmatrix} = \begin{pmatrix} 9 & 0 & a + 2b + 4 \\ 0 & 9 & 2a - 2b + 2 \\ a + 2b + 4 & 2a - 2b + 2 & a^2 + b^2 + 4 \end{pmatrix}.\]We want this to equal $9 \mathbf{I},$ so $a + 2b + 4 = 0,$ $2a - 2b + 2 = 0,$ and $a^2 + b^2 + 4 = 9.$  Solving, we find $(a,b) = \boxed{(-2,-1)}.$